package com.cooge.sharevideo.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;


public class BaseController {
	
	public HttpServletRequest getRequest(){
		return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
	}
	public HttpSession getSession(){
		return this.getRequest().getSession();
	}
	public String getRequestRootUrl(){
		return this.getRequest().getParameter("WebUrl");
	}
}
